<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
     <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<table>
        {% for contact in contacts %}
        <tr>
            <td>{{ contact.sid.stuName }}</td>
            <td>{{ contact.kid.kname }}</td>
            <td>{{ contact.cj }}</td>
            <td>{{ contact.tid.tname }}</td>
        </tr>
        {% endfor %}
</table>
<div class="pagination">
            <span class="step-links">
                {% if contacts.has_previous %}
                    <a href="?page=1">&laquo; 首页</a>
                    <a href="?page={{ contacts.previous_page_number }}">上一页</a>
                {% endif %}

                <span class="current">
                    Page {{ contacts.number }} of {{ contacts.paginator.num_pages }}.
                </span>

                {% if contacts.has_next %}
                    <a href="?page={{ contacts.next_page_number }}">下一页</a>
                    <a href="?page={{ contacts.paginator.num_pages }}">最后一页 &raquo;</a>
                {% endif %}
            </span>
        </div>
</body>
</html>